<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Animal {
            constructor(name,age){
                this.name = name;
                this.age = age;
                this.jump = function(){
                    console.log('它它它')
                }
            }
        }
        let p1 = new Animal('xiaopang',10);
        console.log(p1);

        Animal.prototype.hoppy = function(){
            console.log('打豆豆');
        }
        Animal.prototype.sex = '男';

        Animal.xinqi = function(){
            console.log('三');
        }
        Animal.color = 'aeg';
        console.dir(Animal);

        Animal.xinqi();
        console.log(Animal.color);
        
        p1.hoppy();
        console.log(p1.sex);
        p1.jump();

    </script>
</body>
</html>